package nl.ajonker.railroad.dl;

public class Train {
	private Rail rail;

	public void move() {
		if (rail == null)
			throw new IllegalStateException("No rail for train");
		rail.moveTrain();
	}

	public void setRail(Rail rail) {
		this.rail = rail;
	}

	public Rail getRail() {
		return rail;
	}
}
